﻿
namespace XnaFlash.Actions
{
    public enum ActionCode : byte
    {
        End = 0,

        // SWF 3
        GoToFrame = 0x81,
        GetURL = 0x83,
        NextFrame = 0x04,
        PrevFrame = 0x05,
        Play = 0x06,
        Stop = 0x07,
        ToggleQuality = 0x08,
        StopSounds = 0x09,
        WaitForFrame = 0x8A,
        SetTarget = 0x8B,
        GoToLabel = 0x8C,

        // SWF 4
        Push = 0x96,
        Pop = 0x17,
        Add = 0x0A,
        Subtract = 0x0B,
        Multiply = 0x0C,
        Divide = 0x0D,
        Equals = 0x0E,
        Less = 0x0F,
        And = 0x10,
        Or = 0x11,
        Not = 0x12,
        StringEquals = 0x13,
        StringLength = 0x14,
        StringAdd = 0x21,
        StringExtract = 0x15,
        StringLess = 0x29,
        MBStringLength = 0x31,
        MBStringExtract = 0x35,
        ToInteger = 0x18,
        ToAscii = 0x32,
        ToChar = 0x33,
        MBToAscii = 0x36,
        MBToChar = 0x37,
        Jump = 0x99,
        If = 0x9D,
        Call = 0x9E,
        GetVariable = 0x1C,
        SetVariable = 0x1D,
        GetURL2 = 0x9A,
        GoToFrame2 = 0x9F,
        SetTarget2 = 0x20,
        GetProperty = 0x22,
        SetProperty = 0x23,
        CloneSprite = 0x24,
        RemoveSprite = 0x25,
        StartDrag = 0x27,
        EndDrag = 0x28,
        WaitForFrame2 = 0x8D,
        Trace = 0x26,
        GetTime = 0x34,
        RandomNumber = 0x30,

        // SWF 5
        CallFunction = 0x3D,
        CallMethod = 0x52,
        ConstantPool = 0x88,
        DefineFunction = 0x9B,
        DefineLocal = 0x3C,
        DefineLocalUndef = 0x41,
        Delete = 0x3A,
        Delete2 = 0x3B,
        Enumerate = 0x46,
        Equals2 = 0x49,
        GetMember = 0x4E,
        InitArray = 0x42,
        InitObject = 0x43,
        NewMethod = 0x53,
        NewObject = 0x40,
        SetMember = 0x4F,
        TargetPath = 0x45,
        With = 0x94,
        ToNumber = 0x4A,
        ToString = 0x4B,
        TypeOf = 0x44,
        Add2 = 0x47,
        Less2 = 0x48,
        Modulo = 0x3F,
        BitAnd = 0x60,
        BitOr = 0x61,
        BitXor = 0x62,
        BitLShift = 0x63,
        BitRShift = 0x64,
        BitURShift = 0x65,
        Increment = 0x50,
        Decrement = 0x51,
        PushDuplicate = 0x4C,
        Return = 0x3E,
        StackSwap = 0x4D,
        StoreRegister = 0x87,

        // SWF 6
        InstanceOf = 0x54,
        Enumerate2 = 0x55,
        StrictEquals = 0x66,
        Greater = 0x67,
        StringGreater = 0x68,

        // SWF 7
        DefineFunction2 = 0x8E,
        Extends = 0x69,
        CastOp = 0x2B,
        ImplementsOp = 0x2C,
        Try = 0x8F,
        Throw = 0x2A,
    }
}
